<?php
namespace Home\Controller;
use Think\Controller;
class HomeController extends Controller {
    
    /**
     * 前台控制器初始化
     */
    protected function _initialize() {
        if(APP_STATUS=='dev'){
            define('UID', 1);
            session('userid',1);
        }else{
            define('UID', session('userid'));
        }
        if (!UID) {// 还没登录 跳转到登录页面
            $this->redirect('User/jumpWXlogin');
        }
    }
    
    
}